from django.conf.urls.defaults import patterns, include, url
from django.contrib.auth.views import login, logout
from django.views.generic.simple import direct_to_template

# Uncomment the next two lines to enable the admin:
from django.contrib import admin
admin.autodiscover()


urlpatterns = patterns('',
    #Default 
    (r'^$',direct_to_template, { 'template':'index.html' }),
    (r'^login/$',  login,{ 'template_name':'users/login.html' }),
    (r'^logout/$', logout, { 'next_page':'/index' }),
    (r'^index/$',direct_to_template, { 'template':'index.html' }),
    (r'^accessDenied/$',direct_to_template, { 'template':'accessDenied.html' }),
    
    #Administration
    (r'^admin/', include(admin.site.urls)),
    
    #Utilisateurs
    (r'^users/', include('mmorganizer.users.urls')),
    
    #Games 
    (r'^games/', include('mmorganizer.games.urls')),

    #Characters
    (r'^characters/', include('mmorganizer.characters.urls')),

    #Events
    (r'^events/', include('mmorganizer.events.urls')),
    
    #Divers 
    url(r'^captcha/', include('captcha.urls')),
    # todo : unifier les repertoires de stockage dans c ?
    
    ############## DONNEES STATIQUES PC FIXE VINCE
    #(r'^css/(?P<path>.*)$', 'django.views.static.serve',{'document_root': 'E:/dev/galileo ws/Django-MMO-Organizer/templates/css'}),
    #(r'^images/(?P<path>.*)$', 'django.views.static.serve',{'document_root': 'E:/dev/galileo ws/Django-MMO-Organizer/templates/images'}),
    #(r'^js/(?P<path>.*)$', 'django.views.static.serve',{'document_root': 'E:/dev/galileo ws/Django-MMO-Organizer/templates/js'})
	############## DONNEES STATIQUES PC portable VINCE
    #(r'^css/(?P<path>.*)$', 'django.views.static.serve',{'document_root': 'D:/dev/eclipse.galileo/Django-MMO-Organizer/templates/css'}),
    #(r'^images/(?P<path>.*)$', 'django.views.static.serve',{'document_root': 'D:/dev/eclipse.galileo/Django-MMO-Organizer/templates/images'}),
    #(r'^js/(?P<path>.*)$', 'django.views.static.serve',{'document_root': 'D:/dev/eclipse.galileo/Django-MMO-Organizer/templates/js'})
    ############## DONNEES STATIQUES PC pekou
    (r'^css/(?P<path>.*)$', 'django.views.static.serve',{'document_root': '/home/pekou/django-mmo-organizer/templates/css'}),
    (r'^images/(?P<path>.*)$', 'django.views.static.serve',{'document_root': '/home/pekou/django-mmo-organizer/templates/images'}),
    (r'^js/(?P<path>.*)$', 'django.views.static.serve',{'document_root': '/home/pekou/django-mmo-organizer/templates/js'})
    
)
